{% extends "common/layout_main.html" %}
{% block content %}
    <div class="row  border-bottom">
        <div class="col-lg-12">
            <div class="tab_title">
                <ul class="nav nav-pills">
                    <li class="current">
                        <a href="{{ buildUrl('/account/index') }}">账户列表</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <form class="form-inline wrap_search">
                {% include 'common/search_user.html' %}
                <hr>
                <div class="row">
                    <div class="col-lg-12">
                        <a class="btn btn-w-m btn-outline btn-primary pull-right"
                           href="{{ buildUrl('/account/set') }}">
                            <i class="fa fa-plus"></i>账号
                        </a>
                    </div>
                </div>
            </form>
            <table class="table table-bordered m-t">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>姓名</th>
                    <th>手机</th>
                    <th>邮箱</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% if pagination.items %}
                    {% for user in pagination.items %}
                        <tr>
                            <td>{{ loop.index }}</td>
                            <td>{{ user.nickname }}</td>
                            <td>{{ user.mobile }}</td>
                            <td>{{ user.email }}</td>
                            <td>
                                {% if user.status == 1 %}
                                    <a href="{{ buildUrl('/account/info') }}?id={{ user.uid }}">
                                        <i class="fa fa-eye fa-lg"></i>
                                    </a>

                                    <a class="m-l" href="{{ buildUrl('/account/set') }}?id={{ user.uid }}">
                                        <i class="fa fa-edit fa-lg"></i>
                                    </a>
                                {% endif %}

                                {% if user.status == 1 %}
                                    <a class="m-l remove" href="javascript:void(0);" data={{ user.uid }}>
                                        <i class="fa fa-trash fa-lg"></i>
                                    </a>
                                {% else %}
                                    <a class="m-l recover" href="javascript:void(0);" data={{ user.uid }}>
                                        <i class="fa fa-refresh fa-lg"></i>
                                    </a>
                                {% endif %}
                            </td>
                        </tr>
                    {% endfor %}
                {% else %}
                    <tr>
                        <td colspan="5">暂无信息</td>
                    </tr>
                {% endif %}
                </tbody>
            </table>
            <!--分页代码已被封装到统一模板文件中-->

            {#            <div class="row">#}
            {#                <span class="pagination_count" style="margin-left: 15px">共{{ total_count }}条记录 | 每页{{ per_page }}条</span>#}
            {#                <div class="col-lg-12">#}
            {#                    <nav class="pull-right">#}
            {#                        <ul class="pagination">{{ html|safe }}</ul>#}
            {#                    </nav>#}
            {#                </div>#}
            {#            </div>#}

            {% include "common/pagenation.html" %}

        </div>
    </div>
{% endblock %}
{% block js %}
    <script src="{{ buildStaticUrl('/js/account/index.js') }}"></script>
{% endblock %}
